import ApiClient, { RequestParams } from '../utils/ApiClient.ts';

class HomeRequest {
  /**
   * 获取呼叫器列表
   * @param params
   * @constructor
   */
  public static GetCallerList(params: RequestParams) {
    return ApiClient.get<IGetCallListRes[]>('wx/v1/beeper/listIdName', params);
  }

  /**
   * 获取呼叫器列表
   * @param params
   * @constructor
   */
  public static ServerBtnList(params: RequestParams) {
    return ApiClient.get<IServerBtnListRes>('wx/v1/beeper/homePage', params);
  }

  //获取楼栋单元层 物业缴费基本信息
  public static GetPropertyPaymentInfo(params: RequestParams) {
    return ApiClient.get<IGetPayInfo>('wx/v1/beeperBtn/getPropertyPaymentInfo', params);
  }

  // 获得产品商户的活动优惠内容即活动价
  public static GetActivePreferential(params: RequestParams) {
    return ApiClient.get('wx/v1/beeperBtn/getPropertyPaymentInfo', params);
  }

  //设置健康打卡状态
  public static SetHealthClockState(params: RequestParams) {
    return ApiClient.post<number>('wx/v1/customer/healthClock', params);
  }

  // 获得默认产品
  public static GetBtnDefaultGoods(params: RequestParams) {
    return ApiClient.get<IGetBtnDefaultGoodsRes>('wx/v1/beeperBtn/getBtnDefaultGoods', params);
  }

  // 消防报警根据呼叫器ID获取栋单元层
  public static GetBeeperAddress(params: RequestParams) {
    return ApiClient.get<IGetBeeperAddress>('wx/v1/userHarvestAddress/getAddressByUser', params);
  }

  //获取消防报警记录
  public static GetAlarmRecord(params: RequestParams) {
    return ApiClient.get<IGetAlarmRecord[]>('wx/v1/alarm/listRecentNotEndByBeeper', params);
  }

  //查询当前楼栋下消防报警记录
  public static GetAddressAlarmRecord(params: RequestParams) {
    return ApiClient.get<IGetAlarmRecord[]>('wx/v1/alarm/listRecentNotEndByHouseNumber', params);
  }

  // 提交消防报警订单
  public static SubmitAlarmOrder(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/alarm/alarmReport', params);
  }

  // 获取活动报名列表
  public static GetActivityList(params: RequestParams) {
    return ApiClient.get<IActivityList>('wx/v1/activity/page', params);
  }

  // 活动子按钮列表
  public static ActivityListChildBtn(params: RequestParams) {
    return ApiClient.get<IActivityListChildBtnList[]>('wx/v1/activity/listChildBtn', params);
  }

  // 通过按钮获取产品
  public static GetActivityGoodsByBtn(params: RequestParams) {
    return ApiClient.get<IGetActivityGoodsByBtnList>('wx/v1/activity/getGoodsByBtn', params);
  }
  // 活动报名设置按钮
  public static SetActivityRecord(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/activity/setActivityRecord', params);
  }

  // 获取活动报名详情
  public static GetActivityDetails(params: RequestParams) {
    return ApiClient.get<IActivityListIsList>('wx/v1/activity', params);
  }

  //点赞差评
  public static ActivityClickActions(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/activity/clickActions', params);
  }

  //获取通知详情
  public static GetNotifyDetail(params: RequestParams) {
    return ApiClient.get<IGetNotifyDetail>('wx/v1/sysNotify/getNewOne', params);
  }

  //传id获取指定通知详情
  public static GetNotifyDetailId(params: RequestParams) {
    return ApiClient.get<IGetNotifyDetail>('wx/v1/sysNotify', params);
  }

  //获取通知明细列表
  public static GetMxList(params: RequestParams) {
    return ApiClient.get<IGetMxlist[]>('wx/v1/notifyTaskRecord/getList', params);
  }

  //获取通知统计
  public static GetNotifyStatistics(params: RequestParams) {
    return ApiClient.get<IGetNotifyStatistics>('wx/v1/sysNotify/getNotifyCount', params);
  }

  //通知一键重拨
  public static OnekeyReport(params: RequestParams) {
    return ApiClient.get<null>('wx/v1/sysNotify/againNotify', params);
  }

  //获取通知列表
  public static GetNotifyList(params: RequestParams) {
    return ApiClient.get<INotifyList>('wx/v1/sysNotify/page', params);
  }

  //受困上报提交
  public static TrappedUpload(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/alarmTrap', params);
  }

  //历史上报情况
  public static GetHistoryTrapped(params: RequestParams) {
    return ApiClient.get<ITrappedList[]>('wx/v1/alarmTrap/listData', params)
  }

  //获取当前楼栋下用户
  public static GetCurrentBuildUser(params: RequestParams) {
    return ApiClient.get<IBuildUsers>('wx/v1/customer/pageNoMain', params)
  }

  //发送物业通知
  public static SendInform(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/customer/noticeNoMain', params)
  }

  /**
   * 获得商户列表
   * @param params
   * @constructor
   */
  public static ObtainMerchantList(params: RequestParams) {
    return ApiClient.get<IObtainMerchantListRes[]>('wx/v1/business/listIdName', params);
  }

  /**
   * 获得商户活动
   * @param params
   * @constructor
   */
  public static ObtainMerchantActivity(params: RequestParams) {
    return ApiClient.get<IObtainMerchantActivityRes[]>('wx/v1/active/listData', params);
  }

  /**
   * 获得商户banner图
   * @param params
   * @constructor
   */
  public static ObtainMerchantBanner(params: RequestParams) {
    return ApiClient.get<IObtainMerchantBannerRes[]>('wx/v1/banner/listIdName', params);
  }

  /**
   * 获得商户是否有摄像头
   * @param params
   * @constructor
   */
  public static ObtainHasMerchantSurveillanceCameras(params: RequestParams) {
    return ApiClient.get<number>('wx/v1/camera/checkoutBusinessCamera', params);
  }

  /**
   * 获得商户商品分类
   * @param params
   * @constructor
   */
  public static ObtainProductCategories(params: RequestParams) {
    return ApiClient.get<IObtainProductCategoriesRes[]>('wx/v1/businessClassify/listCheckoutData', params);
  }

  /**
   * 获得商户商品列表
   * @param params
   * @constructor
   */
  public static ObtainProductList(params: RequestParams) {
    return ApiClient.get<IObtainProductListRes[] | IProductInformation[]>('wx/v1/beeperBtn/list', params);
  }

  //获取订单列表
  public static GetOrderList(params: RequestParams) {
    return ApiClient.get<IOrderRes>('wx/v1/order/page', params);
  }

  //获取救援进度
  public static GetRescueList(params: RequestParams) {
    return ApiClient.get<IRescueRes[]>('wx/v1/waiter/listFirstAidWaiter', params);
  }

  /**
   * 获得产品规格
   * @param params
   * @constructor
   */
  public static ObtainProductSpecifications(params: RequestParams) {
    return ApiClient.get<IObtainProductSpecificationsRes>('wx/v1/goodsSpec/getSpecByGoodsId', params);
  }

  /**
   * 获得产品详情
   * @param params
   * @constructor
   */
  public static ObtainProductDetails(params: RequestParams) {
    return ApiClient.get<IProductInformation>('wx/v1/goods', params);
  }

  /**
   * 收藏/取消收藏产品
   * @param params
   * @constructor
   */
  public static CollectOrCancelProd(params: RequestParams) {
    return ApiClient.post<null>('wx/v1/userCollect/setCollect', params);
  }

  /**
   * 获得收藏产品列表
   * @param params
   * @constructor
   */
  public static ObtainCollectedProductList(params: RequestParams) {
    return ApiClient.get<{ list: IProductInformation[] }>('wx/v1/beeperBtn/page', params);
  }
}

export default HomeRequest;
